<template>
	<view class="container">
		<view class="top">
			<view class="top-box">
				<image src="http://images.linglinggong.net/FoHBIgKin3ZC7inntPyO2xyBRjA1" mode="widthFix"></image>
			</view>
		</view>
		<!-- 	<view class="top-time">
			<view class="top-time-box"> 请在 {{ddTime}} 前到达 </view>
		</view> -->
		<view class="cen-text">
			<view class="cen-text-img">
				<image src="https://images.linglinggong.net/%E7%BB%84%202191%402x.png" mode="widthFix"></image>
			</view>
		</view>
		<view class="bottom">
			<view class="bottom-box" @tap="handleClick">
				<image src="http://images.linglinggong.net/FnUrKkRXA3hT8VuqxTtAhS6dRNlj" mode="widthFix"></image>
			</view>
		</view>
	</view>
</template>
<script>
	import AudioPlayer from 'untils/audio-player.js';
	import Voice from '@/libs/QS-baiduyy.js'
	export default {
		data() {
			return {
				ddTime: ''
			}
		},
		onLoad(options) {
			this.ddTime = options.time.slice(10, 20).slice(0, 6)
			this.yuyBob()
		},
		onShow() {},
		methods: {
			yuyBob() {
				setTimeout(() => {
					// 您已接单，请按约定时间前往工作地点==3
					// const player = new AudioPlayer('static/audio/3.mp3')
					// player.play()
					if (uni.getStorageSync('checked1')) {
						Voice('您已接单，请按约定时间前往工作地点')
					}
				}, 300)
			},
			handleClick() {
				setTimeout(() => {
					uni.switchTab({
						url: '/pages/index/index?isNewTask=1'
					})
				}, 600)
				// setTimeout(() => {
				// 	uni.redirectTo({
				// 		url: '/pages/order-detail/order-detail?id=' + this.orderId
				// 	})
				// }, 600)
			}
		}
	}
</script>
<style lang="less" scoped>
	.container {
		width: 100%;
		height: 100vh;
		position: fixed;
		background-color: #fff;
		border: 1px solid #fff;

		.top {
			width: 100%;
			display: flex;
			justify-content: center;
			align-items: center;
			margin-top: 200rpx;
			margin-bottom: 30rpx;

			.top-box {
				width: 70%;
				display: flex;
				justify-content: center;
				align-items: center;

				image {
					width: 168rpx;
					height: 100%;
				}
			}
		}

		.top-time {
			width: 100%;
			display: flex;
			justify-content: center;
			align-items: center;

			.top-time-box {
				width: 90%;
				height: 130rpx;
				// border: 1px solid;
				display: flex;
				justify-content: center;
				align-items: center;
				background-image: url('http://images.linglinggong.net/FrOSFIwUzg7LhF5uSoRk3fqYo-eG');
				background-size: 100% 100%;
				font-size: 30rpx;
				font-weight: 600;
				letter-spacing: 1px;
			}
		}

		.cen-text {
			width: 100%;
			display: flex;
			justify-content: center;
			align-items: center;
			margin-top: 50rpx;

			.cen-text-img {
				width: 90%;
				// height: 130rpx;
				// border: 1px solid;
				display: flex;
				justify-content: flex-start;
				align-items: center;
				margin-left: 42rpx;

				image {
					width: 85%;
					height: 100%;
				}
			}
		}

		.bottom {
			width: 100%;
			position: fixed;
			left: 0;
			bottom: 7%;
			display: flex;
			justify-content: center;
			align-items: center;

			.bottom-box {
				width: 90%;
				height: 130rpx;
				display: flex;
				justify-content: center;
				align-items: center;

				image {
					width: 95%;
					height: 100%;
				}
			}
		}
	}
</style>
